package com.ss.android.article.base.feature.detail2.widget.a;

import android.content.Context;
import android.widget.RelativeLayout;
import com.bytedance.common.utility.UIUtils;
import com.ss.android.article.base.app.AppData;

public abstract class BaseDetailLayout extends RelativeLayout {
    public int i;

    public BaseDetailLayout(Context context) {
        super(context);
        this.i = 0;
        this.initView();
    }

    public BaseDetailLayout(Context context, byte b) {
        super(context);
        this.i = 0;
        this.i = 1;
        this.initView();
    }

    public void initView() {
        AppData.getInstance();
        AppData.isNightMode();
        this.setBackgroundResource(com.ss.android.article.browser.R.drawable.bg_detail_action);
        int halfDp = ((int) UIUtils.dp2px(this.getContext(), 0.5f));
        inflate(this.getContext(), this.getLayoutRes(), this);
        if(this.i == 0) {
            this.setPadding(halfDp, halfDp, halfDp, halfDp);
        }
    }

    public void adaptNightMode(boolean arg2) {
        this.setBackgroundResource(com.ss.android.article.browser.R.drawable.bg_detail_action);
    }

    public abstract int getLayoutRes();
}

